package com.haiqu.haiqu_helper.controller;

import com.haiqu.haiqu_helper.model.JsonResult;
import com.haiqu.haiqu_helper.model.requestModel.CheckLicenseParam;
import com.haiqu.haiqu_helper.service.LicenseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * className: LicenseController
 * description: 证书
 * author: mj
 * date: 2019/9/196:39 PM
 **/
@RestController
@RequestMapping("/license")
public class LicenseController {
	@Autowired
	LicenseService licenseService;

	@PostMapping("/check")
	public JsonResult check(HttpServletRequest request, HttpServletResponse response, @Validated @RequestBody CheckLicenseParam param) {
		JsonResult jsonResult = new JsonResult();
		jsonResult = licenseService.checkLicense(param);
		return jsonResult;
	}

}
